﻿@model IRIS.Models.LinkCreate

@{
    ViewBag.Title = "IRIS Ættleiðingartengd fræðsla : Bæta við hlekk";
}

<h2>Búa til nýjan hlekk</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@if (!ViewData.ModelState.IsValid)
{ 
    <div class="error">
        @Html.ValidationSummary(false)
    </div>
}
@using (Html.BeginForm()) {
 
    <fieldset>
        <legend>Nýr Hlekkur</legend>

        <div class="editor-label">
           Titill
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.Title)
        </div>

        <div class="editor-label">
            Slóð má ekki innihalda http:// eða https://
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.URL)
        </div>

        <div class="editor-label">
            Lýsing á hlekk
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.m_link.Description)
        </div>

        <div class="editor-label">
            Flokkur
        </div>
       <div class="editor-field">
       @Html.DropDownListFor(model => model.m_link.CID, new SelectList(Model.m_linkCategories,"ID", "Name"))
       </div>

        <p>
            <input type="submit" value="Búa til" />
        </p>
    </fieldset>
}

